package com.zkthink.ceres.member.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

import static com.zkthink.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

/**
 * <p>
 * 实体类
 * 会员变化历史
 * </p>
 *
 * @author ck
 * @since 2021-11-26
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("xsy_member_exchange")
@ApiModel(value = "XsyMemberExchange", description = "会员变化历史")
@AllArgsConstructor
public class XsyMemberExchange extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 会员id
     */
    @ApiModelProperty(value = "会员id")
    @TableField("mid")
    @Excel(name = "会员id")
    private Long mid;

    /**
     * 会员角色变化历史
     */
    @ApiModelProperty(value = "会员角色变化历史")
    @TableField("exchange_time")
    @Excel(name = "会员角色变化历史", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime exchangeTime;

    /**
     * 旧的vip类型
     */
    @ApiModelProperty(value = "旧的vip类型")
    @TableField("old_vip")
    @Excel(name = "旧的vip类型")
    private Integer oldVip;

    /**
     * 新的vip类型
     */
    @ApiModelProperty(value = "新的vip类型")
    @TableField("new_vip")
    @Excel(name = "新的vip类型")
    private Integer newVip;

    /**
     * 旧的红娘类型
     */
    @ApiModelProperty(value = "旧的红娘类型")
    @TableField("old_hn")
    @Excel(name = "旧的红娘类型")
    private Integer oldHn;

    /**
     * 新的红娘类型
     */
    @ApiModelProperty(value = "新的红娘类型")
    @TableField("new_hn")
    @Excel(name = "新的红娘类型")
    private Integer newHn;

    /**
     * 旧的咨询师类型
     */
    @ApiModelProperty(value = "旧的咨询师类型")
    @TableField("old_consultant")
    @Excel(name = "旧的咨询师类型")
    private Integer oldConsultant;

    /**
     * 新的咨询师类型
     */
    @ApiModelProperty(value = "新的咨询师类型")
    @TableField("new_consultant")
    @Excel(name = "新的咨询师类型")
    private Integer newConsultant;

    /**
     * 旧的店长类型
     */
    @ApiModelProperty(value = "旧的店长类型")
    @TableField("old_manager")
    @Excel(name = "旧的店长类型")
    private Integer oldManager;

    /**
     * 新的店长类型
     */
    @ApiModelProperty(value = "新的店长类型")
    @TableField("new_manager")
    @Excel(name = "新的店长类型")
    private Integer newManager;

    /**
     * 旧的客服类型
     */
    @ApiModelProperty(value = "旧的客服类型")
    @TableField("old_service")
    @Excel(name = "旧的客服类型")
    private Integer oldService;

    /**
     * 新的客服类型
     */
    @ApiModelProperty(value = "新的客服类型")
    @TableField("new_service")
    @Excel(name = "新的客服类型")
    private Integer newService;

    /**
     * 变化类型:1:vip变化2:红娘变化3:咨询师变化4:店长变化5:客服变化
     */
    @ApiModelProperty(value = "变化类型:1:vip变化2:红娘变化3:咨询师变化4:店长变化5:客服变化")
    @TableField("exchange_type")
    @Excel(name = "变化类型:1:vip变化2:红娘变化3:咨询师变化4:店长变化5:客服变化")
    private Integer exchangeType;


    @Builder
    public XsyMemberExchange(Long id, LocalDateTime updateTime, Long createUser, LocalDateTime createTime, Long updateUser,
                             Long mid, LocalDateTime exchangeTime, Integer oldVip, Integer newVip, Integer oldHn,
                             Integer newHn, Integer oldConsultant, Integer newConsultant, Integer oldManager, Integer newManager, Integer oldService,
                             Integer newService, Integer exchangeType) {
        this.id = id;
        this.updateTime = updateTime;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.mid = mid;
        this.exchangeTime = exchangeTime;
        this.oldVip = oldVip;
        this.newVip = newVip;
        this.oldHn = oldHn;
        this.newHn = newHn;
        this.oldConsultant = oldConsultant;
        this.newConsultant = newConsultant;
        this.oldManager = oldManager;
        this.newManager = newManager;
        this.oldService = oldService;
        this.newService = newService;
        this.exchangeType = exchangeType;
    }

}
